<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
    margin: 0;
    padding: 0;
}
body{
    height: 100vh;
    background: linear-gradient(rgb(95,95,250)10%,rgb(3,3,110));

}
.main,.wave{
    width: 200px;
    height: 200px;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);


}
.main{
    
    border:3px solid darkturquoise;
    
    padding: 10px;
}
.wave{
     
    background: darkturquoise;
    overflow: hidden;
    
}
.wave:after{
    content: "";
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.8);
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%,-60%);
    border-radius: 40%;
    animation: wave 5s linear infinite;

}
.wave::before{
    content:"waterball" ;
    position: absolute;
    left: 50%;
    top: 0;
    color: darkturquoise;
    z-index: 99;
    transform: translate(-50%,30px);

}
@keyframes wave{
    100%{
        transform: translate(-50%,-60%) rotate(360deg);
    }
}

.indicator{
    margin: 10px auto ;
    height: 20vh;
    width: 20vh;
    position: relative;
    border-radius: 50%;
    border: 4px double white;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}
.indicator::after{
    --offset:10%;
    display: block;
    width: 40vh;
    height: 40vh;
    content: "";
    background-color: #a4eafd;
    border-radius: 15vh;
    position: absolute;
    left: 50%;
    top:calc(100% - var(--completion) + var(--offset) );
    translate: -50% 0;
    animation: spin 5s linear infinite;
}
output{
    z-index: 2;
    font-size: 50px;
    font-weight: bold;
}

@keyframes spin{
    100%{
        transform:  rotate(360deg);
    }
}
    </style>
</head>
<body>
    <div class="main">
        <div class="wave">
        </div>
    </div>

    <div class="indicator" style="--completion:86%;">
        <output name="result" for="completion">86</output>
    </div>
    <div style="margin: auto;width: 100px;">
        <input type="range" id="completion" min="0" max="100" />
    </div>
    <script>
        let completion = document.querySelector('#completion');
        completion.addEventListener('input', function(){
            
            var newValue = completion.value;
            console.log("-----"+newValue)
            let indicator = document.querySelector('.indicator');
            indicator.style.setProperty('--completion',newValue+"%");
        });
    </script>
</body>
</html>
